import { _decorator, Component, Node, v3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('Supply')
export class Supply extends Component {
    start() {

    }

    update(deltaTime: number) {
        this.down(deltaTime)
    }

    down(dt: number) {
        let {x, y} = this.node.position

        this.node.setPosition(v3(x, y - 100 * dt))

        if(y < -600) {
            this.node.destroy()
        }
    }
}


